home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / mikecom / msr.asm < prev    next >
Assembly Source File  |  1987-05-16  |  1KB  |  29 lines

  1.  
  2. title GET MODEM STATUS REGISTER
  3. include subfx.h
  4.  
  5. ;  Mike Dumdei,  6 Holly Lane,  Texarakana TX  75503
  6.  
  7. ;**************************************************************************
  8. ; ASYNC_MSR --  Returns the modem status register contents in the lower 8
  9. ;               bits of the returned value (cast to unchar).  Returns 
  10. ;               R_NOPORT if an invalid or unopened port is specified.
  11. ;**************************************************************************
  12. begseg          COMM_TEXT
  13. publicproc      _async_msr
  14.         push    bp
  15.         mov     bp,sp
  16.         push    si              ;stack frame setup
  17.         call    __ck_port_arg   ;ck if valid, load pointers
  18.         jz      stat_exit       ;bad arg if ZR flag set
  19.         mov     al,MSR_VAL
  20.         xor     ah,ah           ;AH=0, AL=MSR value
  21. stat_exit:
  22.         pop     si
  23.         pop     bp
  24.         ret                     ;restore regs and exit
  25. _async_msr      endp
  26.  
  27. endseg          COMM_TEXT
  28.         end
  29.